package com.yic.module.mes.controller.admin.report.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 生产报工 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ReportBaseVO {

    @Schema(description = "生产排产ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3076")
    @NotNull(message = "生产排产ID不能为空")
    private Long moId;

    @Schema(description = "生产工单", requiredMode = Schema.RequiredMode.REQUIRED)
    private String moCode;

    @Schema(description = "生产计划ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21242")
    private Long planId;

    @Schema(description = "计划工单", requiredMode = Schema.RequiredMode.REQUIRED)
    private String planCode;

    @Schema(description = "批次号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String batchNo;

    @Schema(description = "产品信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "15312")
    private Long itemId;

    @Schema(description = "产品生产信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "14543")
    private Long itemProduceId;

    @Schema(description = "工厂", requiredMode = Schema.RequiredMode.REQUIRED, example = "15710")
    private Long factoryId;

    @Schema(description = "生产车间", requiredMode = Schema.RequiredMode.REQUIRED, example = "15710")
    private Long workshopId;

    @Schema(description = "工作中心", requiredMode = Schema.RequiredMode.REQUIRED, example = "10719")
    private Long centerId;

    @Schema(description = "部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "32712")
    private Long deptId;

    @Schema(description = "报工人", requiredMode = Schema.RequiredMode.REQUIRED, example = "11377")
    private Long userId;

    @Schema(description = "协作人")
    private String cooperate;

    @Schema(description = "报工工序", requiredMode = Schema.RequiredMode.REQUIRED, example = "16293")
    @NotNull(message = "报工工序不能为空")
    private Long moRouteId;

    @Schema(description = "报工工序", requiredMode = Schema.RequiredMode.REQUIRED, example = "16293")
    private Long processId;

    @Schema(description = "报工数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "报工数量不能为空")
    private BigDecimal reportAmount;

    @Schema(description = "流水号")
    private String serialNo;

    @Schema(description = "审批时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime approveTime;

    @Schema(description = "审批人")
    private Long approveUser;

    @Schema(description = "审核状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "审核状态不能为空")
    private Integer approve;

}
